import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    react(),
    createSvgIconsPlugin({
      // 配置路劲在src/icons下的svg文件都会被解析
      iconDirs: [resolve(process.cwd(), 'src/icons')],
      // 指定symbolId格式
      // symbolId: 'icon-[dir]-[name]',
    }),
  ],
  resolve: {
    alias: [
      {
        find: '@',
        replacement: resolve('./src'),
      },
    ],
  },
})
